<admintpl file="header" />
</head>
<body>
<td class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:U('Businessset/pricing_tactics_list/')}">服务策略单管理</a></li>
        <li class="active"><a href="#')">服务策略单查看</a></li>
    </ul>

    <form  id="myform2"  method="post" class="form-horizontal js-ajax-form" action="#"  method="post">

        <fieldset>
            <input type="hidden" name="pid" value="{$data.pid}">
            <div class="control-group">
                <label class="control-label">省:</label>
                 <div class="controls">   {$data.province_id|getProvinceName}</div>
                </div>
            <div>
                <label class="control-label">市:</label>
                <div class="controls"> {$data.city_id|getCityName}</div>
                </div>
                <!-- 里程费配置 -->
                <h4 style="color: #f50">里程费配置</h4>
                <table id="div_mileage"  class="table table-hover table-bordered table-list">
                    <thead>
                    <tr>
                        <th >标题</th>
                        <th >公里</th>
                        <th >金额</th>
                        <th  >金额标题</th>
                        <th>每公里金额</th>
                    </tr>
                    </thead>
                    <tbody>
                        <foreach name="mileage" item="vo" key="k">
                            <tr >
                                <td>{$vo.title}
                                </td>
                                <td >{$vo.kilometre}
                                </td>

                                <td>{$vo.money}
                                </td>

                                <td>{$vo.money_title}
                                </td>

                                <td>{$vo.pricePer}
                                </td>
                            </tr>
                        </foreach>
                        <if condition="empty($mileage)">
                            <div style="padding: 30px;text-align: center;color: #999999">
                                <i class="fa fa-database" style="font-size: 38px"></i><br />
                                暂无数据
                            </div>
                        </if>
                    </tbody>
                </table>
                <!-- 排队费用配置 -->
                <h4 style="color: #f50">排队费用配置</h4>
                <table id="div_line_up" class="table table-hover table-bordered table-list">
                    <thead>
                    <tr>
                        <th>标题</th>
                        <th >时长</th>
                        <th >金额</th>
                        <th >金额标题</th>
                        <th >每小时金额</th>
                    </tr>
                    </thead>
                    <tbody>
                    <foreach name="line_up" item="vo" key="k">
                        <tr >
                            <td>{$vo.title}
                            </td>

                        <td>
                            {$vo.timemin}
                        </td>

                        <td>
                            {$vo.money}
                        </td>

                        <td>
                            {$vo.money_title}
                        </td>

                        <td>
                            {$vo.pricePer}
                        </td>
                    </tr>
                    </foreach>
                    <if condition="empty($mileage)">
                        <div style="padding: 30px;text-align: center;color: #999999">
                            <i class="fa fa-database" style="font-size: 38px"></i><br />
                            暂无数据
                        </div>
                    </if>
                    </tbody>
                </table>

                <!-- 夜间加价配置 -->
                <h4 style="color: #f50">夜间加价配置</h4>
                 <table id="div_night" class="table table-hover table-bordered table-list">
                    <thead>
                    <tr>
                        <th>标题</th>
                        <th >开始时间</th>
                        <th >结束时间</th>
                        <th >每单加价金额</th>
                        <th >金额描述</th>
                    </tr>
                    </thead>
                    <tbody>
                    <foreach name="night" item="vo" key="k">
                        <tr>
                        <td>
                            {$vo.title}
                        </td>
                        <td>
                            {$vo.startTime}
                        </td>
                        <td>
                            {$vo.endTime}
                        </td>
                        <td>
                            {$vo.addMoney}
                        </td>
                        <td>
                            {$vo.money_title}
                        </td>
                    </tr>
                        </foreach>
                    <if condition="empty($night)">
                        <div style="padding: 30px;text-align: center;color: #999999">
                            <i class="fa fa-database" style="font-size: 38px"></i><br />
                            暂无数据
                        </div>
                    </if>
                    </tbody>
                </table>

                <!-- 临时加价配置 -->
                <h4 style="color: #f50">临时加价配置</h4>
                <div id="div_temporary" >
                        <div>
                        加价金额：{$temporary.addtimes}
                        </div>
                        <div>
                            加价金额：{$temporary.addtimes_reson}
                        </div>
                    <if condition="empty($temporary)">
                        <div style="padding: 30px;text-align: center;color: #999999">
                            <i class="fa fa-database" style="font-size: 38px"></i><br />
                            暂无数据
                        </div>
                    </if>
                </div>

                <!-- 起步价冗余字段 -->
                <h4 style="color: #f50">起步价冗余字段</h4>
                <table id="div_is_starting_price" class="table table-hover table-bordered table-list">
                    <thead>
                    <tr>
                        <th>起步公里数</th>
                        <th >金额</th>
                        <th >起步公里数</th>
                        <th >金额</th>
                    </tr>
                    </thead>
                    <tbody>
                    <foreach name="is_starting_price" item="vo" key="k">
                        <tr>
                        <td>
                            {$vo.mileageKilometre}
                        </td>
                        <td>
                            {$vo.mileageMoney}
                        </td>
                        <td>
                            {$vo.lineTime}
                        </td>
                        <td>
                            {$vo.lineKoney}
                        </td>
                    </tr>
                        </foreach>

                    </tbody>
                </table>
            </div>
            <if condition="empty($is_starting_price)">
                <div style="padding: 30px;text-align: center;color: #999999">
                    <i class="fa fa-database" style="font-size: 38px"></i><br />
                    暂无数据
                </div>
            </if>
        </fieldset>
        <div class="form-actions">
            <a class="btn" href="{:U('Businessset/pricing_tactics_list')}">{:L('BACK')}</a>
        </div>
    </form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
    function CityChanged(province_id){
        alert(province_id);
        $.ajax({
            url:"{:U('Operation/location_api')}",
            data:"province_id="+$("#city").val(),
            dataType:"JSON",
            success:function(ret){

                cmbAddOption(ret.retValue);
            }
        });
    }

    function cmbAddOption(ret)
    {
        $("#city_id").empty();
        var opetion = null;
        for(var i =0; i<ret.length;i++){
            opetion+= '<option value="'+ret[i].id+'">'+ret[i].city+'</option>';
        }
        $("#city_id").append(opetion);
    }


</script>
</body>
</html>